package daily.mar0325;
//兔子数列
public class FibRecTest {
    public static int fibRec(int num) {
        if (num < 1)
            return 0;
        if (num < 3)
            return 1;
        return fibRec(num - 1) + fibRec(num - 2);
    }

    public static void main(String[] args) {
        int n = 9;
        System.out.println("兔子数列第" +n+"项 = "+fibRec(n));
    }
}
